<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>

    <style>
        .wrapper {
            width: 500px;
            height: auto;
            background-color: whitesmoke;
            box-shadow: 2px 2px 2px 2px gray;
            margin: 20px auto;
            font: 20px/30px '微软雅黑';
            padding: 20px;
        }
        
        ul {
            display: block;
            color: #e74f4d;
            cursor: pointer;
            list-style: none;
        }

        span{
            padding-left: 20px;
        }
        span:hover {
            color: steelblue;
        }

        .more{
            background: url("add (1).png") left center no-repeat;
        }
        
    </style>
</head>
<body>

<div class="wrapper">
    <ul id="root">
        <li><span class="more">root</span>
            <ul style="display: none;">
                <li><span class="more">A</span>
                    <ul style="display:none">
                        <li><span>A-1</span></li>
                        <li><span>A-2</span></li>
                        <li><span>A-3</span></li>
                    </ul>
                </li>

                <li><span class="more">B</span>
                    <ul style="display:none">
                        <li><span>B-1</span></li>
                        <li><span>B-2</span></li>
                        <li><span>B-3</span></li>
                    </ul>
                </li>

                <li><span class="more">C</span>
                    <ul style="display:none">
                        <li><span>C-1</span></li>
                        <li><span>C-2</span></li>
                        <li><span>C-3</span></li>
                    </ul>
                </li>
            </ul>
        </li>
    </ul>
</div>

<script src="task.js"></script>

</body>
</html>